%h2 Documentation

!=form_tag(documents_path, :class => 'search', :method => :get) do
  !=hidden_field_tag(:tag, params[:tag])
  !=label_tag(:search, 'Search')
  !=text_field_tag(:search, params[:search])
  !=submit_tag('Search')

.search_results
  !=render('documents', :documents => @documents)
            
!=render('index_aside')

-if respond_to? :permitted_to?
  -if permitted_to? :create, :documents
    =link_to('New document', new_document_path, :id=>'new_document_link') 
-else
  =link_to('New document', new_document_path, :id=>'new_document_link')
